<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <script th:src="@{/static/js/jquery/jquery.js}" ></script>
    <script th:src="@{/static/js/laydate/laydate.js}"></script>
</head>
<body>
<h2>任务中心</h2>
<div>
    <ul>
        <li  th:each="task:${taskList}">
            <span style="color: green">id:</span><span th:text="${task.id}"></span>
            <span style="color: green">任务主题:</span> <span th:text="${task.theme}"></span>
            <span style="color: green">任务简述:</span> <span th:text="${task.desc}"></span>
            <span style="color: green">管理员ID:</span> <span th:text="${task.adminid}"></span>
            <span style="color: green">任务发布时间:</span><span th:text="${task.releasetime}"></span>
            <span style="color: green">任务开始时间:</span><span th:text="${task.remind.begintime}"></span>
            <span style="color: green">任务截止时间:</span><span th:text="${task.remind.endtime}"></span>
            <span style="color: green">邮件提醒时间:</span><span th:text="${task.remind.remindtime}"></span>
        </li>
        <div style="text-align: center"><span style="font-size: larger;color: rebeccapurple">新建一起任务</span></div>
        <form action="/task/task"  th:object="${task}" method="post">
            <span style="color: darkolivegreen">主题：<input type="text" name="theme" /><br></span>
            <span style="color: darkolivegreen">简述：<textarea name="desc" ></textarea><br></span>
            <span style="color: darkolivegreen">管理员ID：<input type="text" name="adminid" placeholder="1" /><br></span>
            <span style="color: darkolivegreen">开始时间：<input type="text" id="beginTime" name="remind.begintime"><br></span>
            <span style="color: darkolivegreen">结束时间：<input type="text" id="endTime" name="remind.endtime"  /><br></span>
            <span style="color: darkolivegreen">提醒时间<input type="text" id="remindTime" name="remind.remindtime"/><br></span>
            <span style="color: darkolivegreen"><input type="submit" value="发起任务" /></span>
        </form>
    </ul>
</div>
<script>
    //时间选择器启动
    //开始时间
    laydate.render({
        elem: '#beginTime'
        ,type: 'datetime'
    });
    //提醒时间
    laydate.render({
        elem: '#endTime'
        ,type: 'datetime'
    });
    // 提醒时间
    laydate.render({
        elem: '#remindTime'
        ,type: 'datetime'
    });
</script>
</body>
</html>